package com.liuceng.zen.pojo.form;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import com.liuceng.zen.pojo.domain.Member;

import lombok.Data;

@Data
public class ModifyPasswordForm extends BaseForm {

  @NotBlank(message = "请输入旧密码")
  @Length(min = Member.PASSWORD_MIN_LENGTH, max = Member.PASSWORD_MAX_LENGTH,
      message = "密码长度需在{min}到{max}之间")
  public String oldPassword;

  @NotBlank(message = "请输入新密码")
  @Length(min = Member.PASSWORD_MIN_LENGTH, max = Member.PASSWORD_MAX_LENGTH,
      message = "密码长度需在{min}到{max}之间")
  public String newPassword;

  @NotBlank(message = "请重复输入新密码")
  @Length(min = Member.PASSWORD_MIN_LENGTH, max = Member.PASSWORD_MAX_LENGTH,
      message = "密码长度需在{min}到{max}之间")
  public String newPassword2;
}
